package com.jic.market.api.manage;

import com.jic.common.base.vo.PageResult;
import com.jic.common.base.vo.RestResult;
import com.jic.market.request.CouponDetailRequest;
import com.jic.market.request.manager.base.MerchantDeleteRequest;
import com.jic.market.request.manager.base.PromotionIdRequest;
import com.jic.market.request.manager.base.StoreDeleteRequest;
import com.jic.market.request.manager.coupon.CouponTemplatRequest;
import com.jic.market.request.manager.skill.*;
import com.jic.market.response.manager.skill.SkillConfigQueryResponse;
import com.jic.market.response.manager.skill.SkillGoodsQueryResponse;
import com.jic.market.response.manager.skill.SkillMerchantResponse;
import com.jic.market.response.manager.skill.SkillStoreQueryResponse;
import com.jic.market.response.manager.skill.SkillStoreResponse;
import com.jic.market.response.manager.skill.SkillTimeQueryResponse;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: gaolanyu
 * @date: 2020-03-12
 * @remark: 不想再理之前逻辑，太影响时间
 */
@FeignClient(name = "jic-market", path = "/skill")
public interface SkillManageApi {
    @PostMapping("/add-config")
    RestResult<String> addSkillConfig(@RequestBody SkillConfigAddRequest skillConfigAddRequest);

    @PostMapping("/query-config")
    RestResult<SkillConfigQueryResponse> querySkillConfig(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/query-config-list")
    RestResult<List<SkillConfigQueryResponse>> querySkillConfigList(@RequestBody SkillBatchQueryRequest skillBatchQueryRequest);

    @PostMapping("/query-config-page")
    RestResult<PageResult<SkillConfigQueryResponse>> querySkillConfigPage(@RequestBody SkillConfigQueryPageRequest skillConfigQueryPageRequest);

    @PostMapping("/update-config")
    RestResult<Boolean> updateSkillConfig(@RequestBody SkillConfigUpdateaRequest skillConfigUpdateaRequest);

    @PostMapping("/copy-config")
    RestResult<String> copySkillConfig(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/close-config")
    RestResult<Boolean> colseSkillConfig(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/delete-config")
    RestResult<Boolean> deleteSkillConfig(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/add-merchant")
    RestResult<Boolean> addSkillMerchantConfig(@RequestBody SkillMerchantAddRequest skillMerchantAddRequest);

    @PostMapping("/query-merchant")
    RestResult<SkillMerchantResponse> querySkillMerchant(@RequestBody CouponDetailRequest promotionIdRequest);

    @PostMapping("/delete-merchant")
    RestResult<Boolean> deleteSkillMerchant(@RequestBody MerchantDeleteRequest merchantDeleteRequest);

    @PostMapping("/add-store")
    RestResult<Boolean> addSkillStoreConfig(@RequestBody SkillStoreAddRequest skillStoreAddRequest);

    @PostMapping("/query-store")
    RestResult<SkillStoreResponse> querySkillStore(@RequestBody CouponDetailRequest promotionIdRequest);

    @PostMapping("/delete-store")
    RestResult<Boolean> deleteSkillStore(@RequestBody StoreDeleteRequest storeDeleteRequest);

    @PostMapping("/query-time-of-date")
    RestResult<SkillTimeQueryResponse> queryTimeOfDate(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/delete-time-of-date")
    RestResult<Boolean> deleteTimeOfDate(@RequestBody SkillDeleteTimeOfDateRequest skillDeleteTimeOfDateRequest);

    @PostMapping("/query-store-id")
    RestResult<SkillStoreQueryResponse> queryStoreInfo(@RequestBody PromotionIdRequest promotionIdRequest);

    @PostMapping("/add-goods")
    RestResult<Boolean> addGoodsConfig(@RequestBody SkillGoodsIdsRequest skillGoodsRequest);

    @PostMapping("/add-all-goods")
    RestResult<Boolean> addAllGoodsConfig(@RequestBody SkillGoodsIdsRequest skillGoodsRequest);

    @PostMapping("/update-goods")
    RestResult<Boolean> updateGoodsConfig(@RequestBody SkillGoodsRequest skillGoodsRequest);

    @PostMapping("/delete-goods")
    RestResult<Boolean> deleteGoods(@RequestBody SkillGoodsDeleteRequest skillGoodsDeleteRequest);

    @PostMapping("/delete-batch-goods")
    RestResult<Boolean> deleteBatchGoods(@RequestBody SkillBatchDeleteRequest skillBatchDeleteRequest);

    @PostMapping("/query-goods")
    RestResult<SkillGoodsQueryResponse> queryGoodsId(@RequestBody SkillDeleteTimeOfDateRequest skillDeleteTimeOfDateRequest);

    @PostMapping("/check-skill")
    RestResult<Boolean> checkCoupon(@RequestBody SkillCheckRequest skillCheckRequest);

    @PostMapping("/update-image-url")
    RestResult<Boolean> updateImagesUrl(@RequestBody SkillImagesUrlUpdateRequest skillImagesUrlUpdateRequest);

    @PostMapping("/save-template")
    RestResult<String> saveTemplate(@RequestBody CouponTemplatRequest couponTemplatRequest);

}
